<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE FlexibleInstances #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE FunctionalDependencies #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE MultiParamTypeClasses #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE UndecidableInstances #-}</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Search for UndecidableInstances to see why this is needed</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Module      :  Control.Monad.Writer.Class</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Copyright   :  (c) Andy Gill 2001,</span><span>
</span><span id="line-12"></span><span class="hs-comment">--                (c) Oregon Graduate Institute of Science and Technology, 2001</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- License     :  BSD-style (see the file LICENSE)</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- Stability   :  experimental</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- Portability :  non-portable (multi-param classes, functional dependencies)</span><span>
</span><span id="line-18"></span><span class="hs-comment">--</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- The MonadWriter class.</span><span>
</span><span id="line-20"></span><span class="hs-comment">--</span><span>
</span><span id="line-21"></span><span class="hs-comment">--      Inspired by the paper</span><span>
</span><span id="line-22"></span><span class="hs-comment">--      /Functional Programming with Overloading and Higher-Order Polymorphism/,</span><span>
</span><span id="line-23"></span><span class="hs-comment">--        Mark P Jones (&lt;http://web.cecs.pdx.edu/~mpj/pubs/springschool.html&gt;)</span><span>
</span><span id="line-24"></span><span class="hs-comment">--          Advanced School of Functional Programming, 1995.</span><span>
</span><span id="line-25"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Control.Monad.Writer.Class</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-28"></span><span>    </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier">MonadWriter</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>    </span><span class="annot"><a href="Control.Monad.Writer.Class.html#listens"><span class="hs-identifier">listens</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>    </span><span class="annot"><a href="Control.Monad.Writer.Class.html#censor"><span class="hs-identifier">censor</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Error.html#"><span class="hs-identifier">Control.Monad.Trans.Error</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Error</span></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Except.html#"><span class="hs-identifier">Control.Monad.Trans.Except</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Except</span></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Identity.html#"><span class="hs-identifier">Control.Monad.Trans.Identity</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Identity</span></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#"><span class="hs-identifier">Control.Monad.Trans.Maybe</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Maybe</span></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#"><span class="hs-identifier">Control.Monad.Trans.Reader</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Lazy.html#"><span class="hs-identifier">Control.Monad.Trans.RWS.Lazy</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">LazyRWS</span></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Lazy.html#RWST"><span class="hs-identifier">RWST</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Lazy.html#writer"><span class="hs-identifier">writer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Lazy.html#tell"><span class="hs-identifier">tell</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Lazy.html#listen"><span class="hs-identifier">listen</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Lazy.html#pass"><span class="hs-identifier">pass</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Strict.html#"><span class="hs-identifier">Control.Monad.Trans.RWS.Strict</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">StrictRWS</span></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Strict.html#RWST"><span class="hs-identifier">RWST</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Strict.html#writer"><span class="hs-identifier">writer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Strict.html#tell"><span class="hs-identifier">tell</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Strict.html#listen"><span class="hs-identifier">listen</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Strict.html#pass"><span class="hs-identifier">pass</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Lazy.html#"><span class="hs-identifier">Control.Monad.Trans.State.Lazy</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Lazy</span></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#"><span class="hs-identifier">Control.Monad.Trans.State.Strict</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Strict</span></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Lazy.html#"><span class="hs-identifier">Control.Monad.Trans.Writer.Lazy</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Lazy</span></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-45"></span><span>        </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier">WriterT</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Lazy.html#writer"><span class="hs-identifier">writer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Lazy.html#tell"><span class="hs-identifier">tell</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Lazy.html#listen"><span class="hs-identifier">listen</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Lazy.html#pass"><span class="hs-identifier">pass</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Strict.html#"><span class="hs-identifier">Control.Monad.Trans.Writer.Strict</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Strict</span></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-47"></span><span>        </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Strict.html#WriterT"><span class="hs-identifier">WriterT</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Strict.html#writer"><span class="hs-identifier">writer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Strict.html#tell"><span class="hs-identifier">tell</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Strict.html#listen"><span class="hs-identifier">listen</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Strict.html#pass"><span class="hs-identifier">pass</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Class.html#"><span class="hs-identifier">Control.Monad.Trans.Class</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier">lift</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Monoid.html#"><span class="hs-identifier">Data.Monoid</span></a></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-54"></span><span class="hs-comment">-- MonadWriter class</span><span>
</span><span id="line-55"></span><span class="hs-comment">--</span><span>
</span><span id="line-56"></span><span class="hs-comment">-- tell is like tell on the MUD's it shouts to monad</span><span>
</span><span id="line-57"></span><span class="hs-comment">-- what you want to be heard. The monad carries this 'packet'</span><span>
</span><span id="line-58"></span><span class="hs-comment">-- upwards, merging it if needed (hence the Monoid requirement).</span><span>
</span><span id="line-59"></span><span class="hs-comment">--</span><span>
</span><span id="line-60"></span><span class="hs-comment">-- listen listens to a monad acting, and returns what the monad &quot;said&quot;.</span><span>
</span><span id="line-61"></span><span class="hs-comment">--</span><span>
</span><span id="line-62"></span><span class="hs-comment">-- pass lets you provide a writer transformer which changes internals of</span><span>
</span><span id="line-63"></span><span class="hs-comment">-- the written object.</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-keyword">class</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041677"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041676"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span id="MonadWriter"><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-var">MonadWriter</span></a></span></span><span> </span><span id="local-6989586621679041677"><span class="annot"><a href="#local-6989586621679041677"><span class="hs-identifier hs-type">w</span></a></span></span><span> </span><span id="local-6989586621679041676"><span class="annot"><a href="#local-6989586621679041676"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="#local-6989586621679041676"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679041677"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">
#if __GLASGOW_HASKELL__ &gt;= 707
</span><span>    </span><span class="hs-pragma">{-# MINIMAL</span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Control.Monad.Writer.Class.html#writer"><span class="hs-pragma hs-type">writer</span></a></span><span> </span><span class="hs-pragma">|</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#tell"><span class="hs-pragma hs-type">tell</span></a></span><span class="hs-pragma">)</span><span class="hs-pragma">,</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#listen"><span class="hs-pragma hs-type">listen</span></a></span><span class="hs-pragma">,</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#pass"><span class="hs-pragma hs-type">pass</span></a></span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#endif
</span><span>    </span><span class="hs-comment">-- | @'writer' (a,w)@ embeds a simple writer action.</span><span>
</span><span id="line-70"></span><span>    </span><span id="local-6989586621679041674"><span id="writer"><span class="annot"><a href="Control.Monad.Writer.Class.html#writer"><span class="hs-identifier hs-type">writer</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679041674"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679041677"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679041676"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041674"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-71"></span><span>    </span><span id="local-6989586621679041378"><span class="annot"><a href="Control.Monad.Writer.Class.html#writer"><span class="hs-identifier hs-var hs-var">writer</span></a></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679041373"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679041373"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679041372"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041372"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-72"></span><span>      </span><span class="annot"><span class="annottext">w -&gt; m ()
forall w (m :: * -&gt; *). MonadWriter w m =&gt; w -&gt; m ()
</span><a href="Control.Monad.Writer.Class.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041372"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-73"></span><span>      </span><span class="annot"><span class="annottext">a -&gt; m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679041373"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span>    </span><span class="hs-comment">-- | @'tell' w@ is an action that produces the output @w@.</span><span>
</span><span id="line-76"></span><span>    </span><span id="tell"><span class="annot"><a href="Control.Monad.Writer.Class.html#tell"><span class="hs-identifier hs-type">tell</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679041677"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679041676"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-77"></span><span>    </span><span id="local-6989586621679041371"><span class="annot"><a href="Control.Monad.Writer.Class.html#tell"><span class="hs-identifier hs-var hs-var">tell</span></a></span><span> </span><span id="local-6989586621679041369"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041369"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((), w) -&gt; m ()
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; (a, w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#writer"><span class="hs-identifier hs-var">writer</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041369"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span>    </span><span class="hs-comment">-- | @'listen' m@ is an action that executes the action @m@ and adds</span><span>
</span><span id="line-80"></span><span>    </span><span class="hs-comment">-- its output to the value of the computation.</span><span>
</span><span id="line-81"></span><span>    </span><span id="local-6989586621679041662"><span id="listen"><span class="annot"><a href="Control.Monad.Writer.Class.html#listen"><span class="hs-identifier hs-type">listen</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679041676"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041662"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679041676"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679041662"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679041677"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-82"></span><span>    </span><span class="hs-comment">-- | @'pass' m@ is an action that executes the action @m@, which</span><span>
</span><span id="line-83"></span><span>    </span><span class="hs-comment">-- returns a value and a function, and returns the value, applying</span><span>
</span><span id="line-84"></span><span>    </span><span class="hs-comment">-- the function to the output.</span><span>
</span><span id="line-85"></span><span>    </span><span id="local-6989586621679041655"><span id="pass"><span class="annot"><a href="Control.Monad.Writer.Class.html#pass"><span class="hs-identifier hs-type">pass</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679041676"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679041655"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679041677"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679041677"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679041676"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041655"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-comment">-- | @'listens' f m@ is an action that executes the action @m@ and adds</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- the result of applying @f@ to the output to the value of the computation.</span><span>
</span><span id="line-89"></span><span class="hs-comment">--</span><span>
</span><span id="line-90"></span><span class="hs-comment">-- * @'listens' f m = 'liftM' (id *** f) ('listen' m)@</span><span>
</span><span id="line-91"></span><span id="local-6989586621679041667"><span id="local-6989586621679041668"><span id="local-6989586621679041669"><span id="local-6989586621679041670"><span class="annot"><a href="Control.Monad.Writer.Class.html#listens"><span class="hs-identifier hs-type">listens</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041670"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041669"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679041670"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679041668"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679041669"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041667"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679041669"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679041667"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679041668"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-92"></span><span id="listens"><span class="annot"><span class="annottext">listens :: forall w (m :: * -&gt; *) b a.
MonadWriter w m =&gt;
(w -&gt; b) -&gt; m a -&gt; m (a, b)
</span><a href="Control.Monad.Writer.Class.html#listens"><span class="hs-identifier hs-var hs-var">listens</span></a></span></span><span> </span><span id="local-6989586621679041363"><span class="annot"><span class="annottext">w -&gt; b
</span><a href="#local-6989586621679041363"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679041362"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679041362"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-93"></span><span>    </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679041361"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679041361"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679041360"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041360"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m a -&gt; m (a, w)
</span><a href="Control.Monad.Writer.Class.html#listen"><span class="hs-identifier hs-var">listen</span></a></span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679041362"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-94"></span><span>    </span><span class="annot"><span class="annottext">(a, b) -&gt; m (a, b)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679041361"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w -&gt; b
</span><a href="#local-6989586621679041363"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041360"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-comment">-- | @'censor' f m@ is an action that executes the action @m@ and</span><span>
</span><span id="line-97"></span><span class="hs-comment">-- applies the function @f@ to its output, leaving the return value</span><span>
</span><span id="line-98"></span><span class="hs-comment">-- unchanged.</span><span>
</span><span id="line-99"></span><span class="hs-comment">--</span><span>
</span><span id="line-100"></span><span class="hs-comment">-- * @'censor' f m = 'pass' ('liftM' (\\x -&gt; (x,f)) m)@</span><span>
</span><span id="line-101"></span><span id="local-6989586621679041659"><span id="local-6989586621679041660"><span id="local-6989586621679041661"><span class="annot"><a href="Control.Monad.Writer.Class.html#censor"><span class="hs-identifier hs-type">censor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041661"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041660"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679041661"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679041661"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679041660"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041659"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679041660"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041659"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-102"></span><span id="censor"><span class="annot"><span class="annottext">censor :: forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; (w -&gt; w) -&gt; m a -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#censor"><span class="hs-identifier hs-var hs-var">censor</span></a></span></span><span> </span><span id="local-6989586621679041354"><span class="annot"><span class="annottext">w -&gt; w
</span><a href="#local-6989586621679041354"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679041353"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679041353"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w -&gt; w) -&gt; m a
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m (a, w -&gt; w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#pass"><span class="hs-identifier hs-var">pass</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, w -&gt; w) -&gt; m a) -&gt; m (a, w -&gt; w) -&gt; m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-103"></span><span>    </span><span id="local-6989586621679041352"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679041352"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679041353"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-104"></span><span>    </span><span class="annot"><span class="annottext">(a, w -&gt; w) -&gt; m (a, w -&gt; w)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679041352"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w -&gt; w
</span><a href="#local-6989586621679041354"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-cpp">

#if MIN_VERSION_base(4,9,0)
</span><span class="hs-comment">-- | __NOTE__: This instance is only defined for @base &gt;= 4.9.0@.</span><span>
</span><span id="line-108"></span><span class="hs-comment">--</span><span>
</span><span id="line-109"></span><span class="hs-comment">-- @since 2.2.2</span><span>
</span><span id="line-110"></span><span id="local-6989586621679041650"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041650"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041650"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679041650"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-111"></span><span>  </span><span id="local-6989586621679041339"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; (w, a)
</span><a href="#local-6989586621679041339"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679041338"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679041338"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679041337"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041337"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041337"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679041338"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span>  </span><span id="local-6989586621679041336"><span class="annot"><span class="annottext">tell :: w -&gt; (w, ())
</span><a href="#local-6989586621679041336"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span> </span><span id="local-6989586621679041335"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041335"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041335"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-113"></span><span>  </span><span id="local-6989586621679041334"><span class="annot"><span class="annottext">listen :: forall a. (w, a) -&gt; (w, (a, w))
</span><a href="#local-6989586621679041334"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679041333"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041333"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679041332"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679041332"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041333"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679041332"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041333"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-114"></span><span>  </span><span id="local-6989586621679041331"><span class="annot"><span class="annottext">pass :: forall a. (w, (a, w -&gt; w)) -&gt; (w, a)
</span><a href="#local-6989586621679041331"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679041330"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041330"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679041329"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679041329"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679041328"><span class="annot"><span class="annottext">w -&gt; w
</span><a href="#local-6989586621679041328"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">w -&gt; w
</span><a href="#local-6989586621679041328"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679041330"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679041329"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-117"></span><span id="local-6989586621679041642"><span id="local-6989586621679041643"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041643"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041642"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041643"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">Lazy.WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041643"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041642"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-118"></span><span>    </span><span id="local-6989586621679041314"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; WriterT w m a
</span><a href="#local-6989586621679041314"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; WriterT w m a
forall (m :: * -&gt; *) a w. Monad m =&gt; (a, w) -&gt; WriterT w m a
</span><a href="../../transformers/src/Control.Monad.Trans.Writer.Lazy.html#writer"><span class="hs-identifier hs-var">Lazy.writer</span></a></span><span>
</span><span id="line-119"></span><span>    </span><span id="local-6989586621679041312"><span class="annot"><span class="annottext">tell :: w -&gt; WriterT w m ()
</span><a href="#local-6989586621679041312"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">w -&gt; WriterT w m ()
forall (m :: * -&gt; *) w. Monad m =&gt; w -&gt; WriterT w m ()
</span><a href="../../transformers/src/Control.Monad.Trans.Writer.Lazy.html#tell"><span class="hs-identifier hs-var">Lazy.tell</span></a></span><span>
</span><span id="line-120"></span><span>    </span><span id="local-6989586621679041310"><span class="annot"><span class="annottext">listen :: forall a. WriterT w m a -&gt; WriterT w m (a, w)
</span><a href="#local-6989586621679041310"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; WriterT w m (a, w)
forall (m :: * -&gt; *) w a.
Monad m =&gt;
WriterT w m a -&gt; WriterT w m (a, w)
</span><a href="../../transformers/src/Control.Monad.Trans.Writer.Lazy.html#listen"><span class="hs-identifier hs-var">Lazy.listen</span></a></span><span>
</span><span id="line-121"></span><span>    </span><span id="local-6989586621679041308"><span class="annot"><span class="annottext">pass :: forall a. WriterT w m (a, w -&gt; w) -&gt; WriterT w m a
</span><a href="#local-6989586621679041308"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WriterT w m (a, w -&gt; w) -&gt; WriterT w m a
forall (m :: * -&gt; *) w a.
Monad m =&gt;
WriterT w m (a, w -&gt; w) -&gt; WriterT w m a
</span><a href="../../transformers/src/Control.Monad.Trans.Writer.Lazy.html#pass"><span class="hs-identifier hs-var">Lazy.pass</span></a></span></span></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span id="local-6989586621679041623"><span id="local-6989586621679041624"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041624"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041623"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041624"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Writer.Strict.html#WriterT"><span class="hs-identifier hs-type">Strict.WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041624"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041623"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-124"></span><span>    </span><span id="local-6989586621679041294"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; WriterT w m a
</span><a href="#local-6989586621679041294"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; WriterT w m a
forall (m :: * -&gt; *) a w. Monad m =&gt; (a, w) -&gt; WriterT w m a
</span><a href="../../transformers/src/Control.Monad.Trans.Writer.Strict.html#writer"><span class="hs-identifier hs-var">Strict.writer</span></a></span><span>
</span><span id="line-125"></span><span>    </span><span id="local-6989586621679041292"><span class="annot"><span class="annottext">tell :: w -&gt; WriterT w m ()
</span><a href="#local-6989586621679041292"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">w -&gt; WriterT w m ()
forall (m :: * -&gt; *) w. Monad m =&gt; w -&gt; WriterT w m ()
</span><a href="../../transformers/src/Control.Monad.Trans.Writer.Strict.html#tell"><span class="hs-identifier hs-var">Strict.tell</span></a></span><span>
</span><span id="line-126"></span><span>    </span><span id="local-6989586621679041290"><span class="annot"><span class="annottext">listen :: forall a. WriterT w m a -&gt; WriterT w m (a, w)
</span><a href="#local-6989586621679041290"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; WriterT w m (a, w)
forall (m :: * -&gt; *) w a.
Monad m =&gt;
WriterT w m a -&gt; WriterT w m (a, w)
</span><a href="../../transformers/src/Control.Monad.Trans.Writer.Strict.html#listen"><span class="hs-identifier hs-var">Strict.listen</span></a></span><span>
</span><span id="line-127"></span><span>    </span><span id="local-6989586621679041288"><span class="annot"><span class="annottext">pass :: forall a. WriterT w m (a, w -&gt; w) -&gt; WriterT w m a
</span><a href="#local-6989586621679041288"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WriterT w m (a, w -&gt; w) -&gt; WriterT w m a
forall (m :: * -&gt; *) w a.
Monad m =&gt;
WriterT w m (a, w -&gt; w) -&gt; WriterT w m a
</span><a href="../../transformers/src/Control.Monad.Trans.Writer.Strict.html#pass"><span class="hs-identifier hs-var">Strict.pass</span></a></span></span></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span id="local-6989586621679041600"><span id="local-6989586621679041601"><span id="local-6989586621679041602"><span id="local-6989586621679041603"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041603"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041602"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041603"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Lazy.html#RWST"><span class="hs-identifier hs-type">LazyRWS.RWST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041601"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041603"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041600"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041602"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-130"></span><span>    </span><span id="local-6989586621679041274"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; RWST r w s m a
</span><a href="#local-6989586621679041274"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; RWST r w s m a
forall (m :: * -&gt; *) a w r s. Monad m =&gt; (a, w) -&gt; RWST r w s m a
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.Lazy.html#writer"><span class="hs-identifier hs-var">LazyRWS.writer</span></a></span><span>
</span><span id="line-131"></span><span>    </span><span id="local-6989586621679041272"><span class="annot"><span class="annottext">tell :: w -&gt; RWST r w s m ()
</span><a href="#local-6989586621679041272"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">w -&gt; RWST r w s m ()
forall (m :: * -&gt; *) w r s. Monad m =&gt; w -&gt; RWST r w s m ()
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.Lazy.html#tell"><span class="hs-identifier hs-var">LazyRWS.tell</span></a></span><span>
</span><span id="line-132"></span><span>    </span><span id="local-6989586621679041270"><span class="annot"><span class="annottext">listen :: forall a. RWST r w s m a -&gt; RWST r w s m (a, w)
</span><a href="#local-6989586621679041270"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RWST r w s m a -&gt; RWST r w s m (a, w)
forall (m :: * -&gt; *) r w s a.
Monad m =&gt;
RWST r w s m a -&gt; RWST r w s m (a, w)
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.Lazy.html#listen"><span class="hs-identifier hs-var">LazyRWS.listen</span></a></span><span>
</span><span id="line-133"></span><span>    </span><span id="local-6989586621679041268"><span class="annot"><span class="annottext">pass :: forall a. RWST r w s m (a, w -&gt; w) -&gt; RWST r w s m a
</span><a href="#local-6989586621679041268"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RWST r w s m (a, w -&gt; w) -&gt; RWST r w s m a
forall (m :: * -&gt; *) r w s a.
Monad m =&gt;
RWST r w s m (a, w -&gt; w) -&gt; RWST r w s m a
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.Lazy.html#pass"><span class="hs-identifier hs-var">LazyRWS.pass</span></a></span></span></span></span></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span id="local-6989586621679041569"><span id="local-6989586621679041570"><span id="local-6989586621679041571"><span id="local-6989586621679041572"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041572"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041571"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041572"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.RWS.Strict.html#RWST"><span class="hs-identifier hs-type">StrictRWS.RWST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041570"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041572"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041569"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041571"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-136"></span><span>    </span><span id="local-6989586621679041254"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; RWST r w s m a
</span><a href="#local-6989586621679041254"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; RWST r w s m a
forall (m :: * -&gt; *) a w r s. Monad m =&gt; (a, w) -&gt; RWST r w s m a
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.Strict.html#writer"><span class="hs-identifier hs-var">StrictRWS.writer</span></a></span><span>
</span><span id="line-137"></span><span>    </span><span id="local-6989586621679041252"><span class="annot"><span class="annottext">tell :: w -&gt; RWST r w s m ()
</span><a href="#local-6989586621679041252"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">w -&gt; RWST r w s m ()
forall (m :: * -&gt; *) w r s. Monad m =&gt; w -&gt; RWST r w s m ()
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.Strict.html#tell"><span class="hs-identifier hs-var">StrictRWS.tell</span></a></span><span>
</span><span id="line-138"></span><span>    </span><span id="local-6989586621679041250"><span class="annot"><span class="annottext">listen :: forall a. RWST r w s m a -&gt; RWST r w s m (a, w)
</span><a href="#local-6989586621679041250"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RWST r w s m a -&gt; RWST r w s m (a, w)
forall (m :: * -&gt; *) r w s a.
Monad m =&gt;
RWST r w s m a -&gt; RWST r w s m (a, w)
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.Strict.html#listen"><span class="hs-identifier hs-var">StrictRWS.listen</span></a></span><span>
</span><span id="line-139"></span><span>    </span><span id="local-6989586621679041248"><span class="annot"><span class="annottext">pass :: forall a. RWST r w s m (a, w -&gt; w) -&gt; RWST r w s m a
</span><a href="#local-6989586621679041248"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RWST r w s m (a, w -&gt; w) -&gt; RWST r w s m a
forall (m :: * -&gt; *) r w s a.
Monad m =&gt;
RWST r w s m (a, w -&gt; w) -&gt; RWST r w s m a
</span><a href="../../transformers/src/Control.Monad.Trans.RWS.Strict.html#pass"><span class="hs-identifier hs-var">StrictRWS.pass</span></a></span></span></span></span></span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-142"></span><span class="hs-comment">-- Instances for other mtl transformers</span><span>
</span><span id="line-143"></span><span class="hs-comment">--</span><span>
</span><span id="line-144"></span><span class="hs-comment">-- All of these instances need UndecidableInstances,</span><span>
</span><span id="line-145"></span><span class="hs-comment">-- because they do not satisfy the coverage condition.</span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span id="local-6989586621679041537"><span id="local-6989586621679041538"><span id="local-6989586621679041539"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Error.html#Error"><span class="hs-identifier hs-type">Error</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041539"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041538"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041537"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041538"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Error.html#ErrorT"><span class="hs-identifier hs-type">ErrorT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041539"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041537"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-148"></span><span>    </span><span id="local-6989586621679041229"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; ErrorT e m a
</span><a href="#local-6989586621679041229"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; ErrorT e m a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m a -&gt; ErrorT e m a) -&gt; ((a, w) -&gt; m a) -&gt; (a, w) -&gt; ErrorT e m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; m a
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; (a, w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#writer"><span class="hs-identifier hs-var">writer</span></a></span><span>
</span><span id="line-149"></span><span>    </span><span id="local-6989586621679041224"><span class="annot"><span class="annottext">tell :: w -&gt; ErrorT e m ()
</span><a href="#local-6989586621679041224"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m () -&gt; ErrorT e m ()
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m () -&gt; ErrorT e m ()) -&gt; (w -&gt; m ()) -&gt; w -&gt; ErrorT e m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; m ()
forall w (m :: * -&gt; *). MonadWriter w m =&gt; w -&gt; m ()
</span><a href="Control.Monad.Writer.Class.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span>
</span><span id="line-150"></span><span>    </span><span id="local-6989586621679041221"><span class="annot"><span class="annottext">listen :: forall a. ErrorT e m a -&gt; ErrorT e m (a, w)
</span><a href="#local-6989586621679041221"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Listen w m (Either e a) -&gt; Listen w (ErrorT e m) a
forall (m :: * -&gt; *) w e a.
Monad m =&gt;
Listen w m (Either e a) -&gt; Listen w (ErrorT e m) a
</span><a href="../../transformers/src/Control.Monad.Trans.Error.html#liftListen"><span class="hs-identifier hs-var">Error.liftListen</span></a></span><span> </span><span class="annot"><span class="annottext">Listen w m (Either e a)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m a -&gt; m (a, w)
</span><a href="Control.Monad.Writer.Class.html#listen"><span class="hs-identifier hs-var">listen</span></a></span><span>
</span><span id="line-151"></span><span>    </span><span id="local-6989586621679041217"><span class="annot"><span class="annottext">pass :: forall a. ErrorT e m (a, w -&gt; w) -&gt; ErrorT e m a
</span><a href="#local-6989586621679041217"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pass w m (Either e a) -&gt; Pass w (ErrorT e m) a
forall (m :: * -&gt; *) w e a.
Monad m =&gt;
Pass w m (Either e a) -&gt; Pass w (ErrorT e m) a
</span><a href="../../transformers/src/Control.Monad.Trans.Error.html#liftPass"><span class="hs-identifier hs-var">Error.liftPass</span></a></span><span> </span><span class="annot"><span class="annottext">Pass w m (Either e a)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m (a, w -&gt; w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#pass"><span class="hs-identifier hs-var">pass</span></a></span></span></span></span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span class="hs-comment">-- | @since 2.2</span><span>
</span><span id="line-154"></span><span id="local-6989586621679041507"><span id="local-6989586621679041508"><span id="local-6989586621679041509"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041509"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041508"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041509"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041507"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041508"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-155"></span><span>    </span><span id="local-6989586621679041198"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; ExceptT e m a
</span><a href="#local-6989586621679041198"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; ExceptT e m a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m a -&gt; ExceptT e m a)
-&gt; ((a, w) -&gt; m a) -&gt; (a, w) -&gt; ExceptT e m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; m a
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; (a, w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#writer"><span class="hs-identifier hs-var">writer</span></a></span><span>
</span><span id="line-156"></span><span>    </span><span id="local-6989586621679041194"><span class="annot"><span class="annottext">tell :: w -&gt; ExceptT e m ()
</span><a href="#local-6989586621679041194"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m () -&gt; ExceptT e m ()
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m () -&gt; ExceptT e m ()) -&gt; (w -&gt; m ()) -&gt; w -&gt; ExceptT e m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; m ()
forall w (m :: * -&gt; *). MonadWriter w m =&gt; w -&gt; m ()
</span><a href="Control.Monad.Writer.Class.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span>
</span><span id="line-157"></span><span>    </span><span id="local-6989586621679041191"><span class="annot"><span class="annottext">listen :: forall a. ExceptT e m a -&gt; ExceptT e m (a, w)
</span><a href="#local-6989586621679041191"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Listen w m (Either e a) -&gt; Listen w (ExceptT e m) a
forall (m :: * -&gt; *) w e a.
Monad m =&gt;
Listen w m (Either e a) -&gt; Listen w (ExceptT e m) a
</span><a href="../../transformers/src/Control.Monad.Trans.Except.html#liftListen"><span class="hs-identifier hs-var">Except.liftListen</span></a></span><span> </span><span class="annot"><span class="annottext">Listen w m (Either e a)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m a -&gt; m (a, w)
</span><a href="Control.Monad.Writer.Class.html#listen"><span class="hs-identifier hs-var">listen</span></a></span><span>
</span><span id="line-158"></span><span>    </span><span id="local-6989586621679041187"><span class="annot"><span class="annottext">pass :: forall a. ExceptT e m (a, w -&gt; w) -&gt; ExceptT e m a
</span><a href="#local-6989586621679041187"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pass w m (Either e a) -&gt; Pass w (ExceptT e m) a
forall (m :: * -&gt; *) w e a.
Monad m =&gt;
Pass w m (Either e a) -&gt; Pass w (ExceptT e m) a
</span><a href="../../transformers/src/Control.Monad.Trans.Except.html#liftPass"><span class="hs-identifier hs-var">Except.liftPass</span></a></span><span> </span><span class="annot"><span class="annottext">Pass w m (Either e a)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m (a, w -&gt; w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#pass"><span class="hs-identifier hs-var">pass</span></a></span></span></span></span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span id="local-6989586621679041489"><span id="local-6989586621679041490"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041490"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041489"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041490"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Identity.html#IdentityT"><span class="hs-identifier hs-type">IdentityT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041489"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-161"></span><span>    </span><span id="local-6989586621679041168"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; IdentityT m a
</span><a href="#local-6989586621679041168"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; IdentityT m a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m a -&gt; IdentityT m a)
-&gt; ((a, w) -&gt; m a) -&gt; (a, w) -&gt; IdentityT m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; m a
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; (a, w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#writer"><span class="hs-identifier hs-var">writer</span></a></span><span>
</span><span id="line-162"></span><span>    </span><span id="local-6989586621679041164"><span class="annot"><span class="annottext">tell :: w -&gt; IdentityT m ()
</span><a href="#local-6989586621679041164"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m () -&gt; IdentityT m ()
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m () -&gt; IdentityT m ()) -&gt; (w -&gt; m ()) -&gt; w -&gt; IdentityT m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; m ()
forall w (m :: * -&gt; *). MonadWriter w m =&gt; w -&gt; m ()
</span><a href="Control.Monad.Writer.Class.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span>
</span><span id="line-163"></span><span>    </span><span id="local-6989586621679041162"><span class="annot"><span class="annottext">listen :: forall a. IdentityT m a -&gt; IdentityT m (a, w)
</span><a href="#local-6989586621679041162"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(m a -&gt; m (a, w)) -&gt; IdentityT m a -&gt; IdentityT m (a, w)
forall {k1} {k2} (m :: k1 -&gt; *) (a :: k1) (n :: k2 -&gt; *) (b :: k2).
(m a -&gt; n b) -&gt; IdentityT m a -&gt; IdentityT n b
</span><a href="../../transformers/src/Control.Monad.Trans.Identity.html#mapIdentityT"><span class="hs-identifier hs-var">Identity.mapIdentityT</span></a></span><span> </span><span class="annot"><span class="annottext">m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m a -&gt; m (a, w)
</span><a href="Control.Monad.Writer.Class.html#listen"><span class="hs-identifier hs-var">listen</span></a></span><span>
</span><span id="line-164"></span><span>    </span><span id="local-6989586621679041159"><span class="annot"><span class="annottext">pass :: forall a. IdentityT m (a, w -&gt; w) -&gt; IdentityT m a
</span><a href="#local-6989586621679041159"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(m (a, w -&gt; w) -&gt; m a) -&gt; IdentityT m (a, w -&gt; w) -&gt; IdentityT m a
forall {k1} {k2} (m :: k1 -&gt; *) (a :: k1) (n :: k2 -&gt; *) (b :: k2).
(m a -&gt; n b) -&gt; IdentityT m a -&gt; IdentityT n b
</span><a href="../../transformers/src/Control.Monad.Trans.Identity.html#mapIdentityT"><span class="hs-identifier hs-var">Identity.mapIdentityT</span></a></span><span> </span><span class="annot"><span class="annottext">m (a, w -&gt; w) -&gt; m a
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m (a, w -&gt; w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#pass"><span class="hs-identifier hs-var">pass</span></a></span></span></span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span id="local-6989586621679041474"><span id="local-6989586621679041475"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041475"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041474"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041475"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#MaybeT"><span class="hs-identifier hs-type">MaybeT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041474"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-167"></span><span>    </span><span id="local-6989586621679041141"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; MaybeT m a
</span><a href="#local-6989586621679041141"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; MaybeT m a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m a -&gt; MaybeT m a) -&gt; ((a, w) -&gt; m a) -&gt; (a, w) -&gt; MaybeT m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; m a
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; (a, w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#writer"><span class="hs-identifier hs-var">writer</span></a></span><span>
</span><span id="line-168"></span><span>    </span><span id="local-6989586621679041137"><span class="annot"><span class="annottext">tell :: w -&gt; MaybeT m ()
</span><a href="#local-6989586621679041137"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m () -&gt; MaybeT m ()
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m () -&gt; MaybeT m ()) -&gt; (w -&gt; m ()) -&gt; w -&gt; MaybeT m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; m ()
forall w (m :: * -&gt; *). MonadWriter w m =&gt; w -&gt; m ()
</span><a href="Control.Monad.Writer.Class.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span>
</span><span id="line-169"></span><span>    </span><span id="local-6989586621679041134"><span class="annot"><span class="annottext">listen :: forall a. MaybeT m a -&gt; MaybeT m (a, w)
</span><a href="#local-6989586621679041134"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Listen w m (Maybe a) -&gt; Listen w (MaybeT m) a
forall (m :: * -&gt; *) w a.
Monad m =&gt;
Listen w m (Maybe a) -&gt; Listen w (MaybeT m) a
</span><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#liftListen"><span class="hs-identifier hs-var">Maybe.liftListen</span></a></span><span> </span><span class="annot"><span class="annottext">Listen w m (Maybe a)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m a -&gt; m (a, w)
</span><a href="Control.Monad.Writer.Class.html#listen"><span class="hs-identifier hs-var">listen</span></a></span><span>
</span><span id="line-170"></span><span>    </span><span id="local-6989586621679041130"><span class="annot"><span class="annottext">pass :: forall a. MaybeT m (a, w -&gt; w) -&gt; MaybeT m a
</span><a href="#local-6989586621679041130"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pass w m (Maybe a) -&gt; Pass w (MaybeT m) a
forall (m :: * -&gt; *) w a.
Monad m =&gt;
Pass w m (Maybe a) -&gt; Pass w (MaybeT m) a
</span><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#liftPass"><span class="hs-identifier hs-var">Maybe.liftPass</span></a></span><span> </span><span class="annot"><span class="annottext">Pass w m (Maybe a)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m (a, w -&gt; w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#pass"><span class="hs-identifier hs-var">pass</span></a></span></span></span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span id="local-6989586621679041456"><span id="local-6989586621679041457"><span id="local-6989586621679041458"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041458"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041457"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041458"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041456"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041457"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-173"></span><span>    </span><span id="local-6989586621679041111"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; ReaderT r m a
</span><a href="#local-6989586621679041111"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; ReaderT r m a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m a -&gt; ReaderT r m a)
-&gt; ((a, w) -&gt; m a) -&gt; (a, w) -&gt; ReaderT r m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; m a
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; (a, w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#writer"><span class="hs-identifier hs-var">writer</span></a></span><span>
</span><span id="line-174"></span><span>    </span><span id="local-6989586621679041107"><span class="annot"><span class="annottext">tell :: w -&gt; ReaderT r m ()
</span><a href="#local-6989586621679041107"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m () -&gt; ReaderT r m ()
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m () -&gt; ReaderT r m ()) -&gt; (w -&gt; m ()) -&gt; w -&gt; ReaderT r m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; m ()
forall w (m :: * -&gt; *). MonadWriter w m =&gt; w -&gt; m ()
</span><a href="Control.Monad.Writer.Class.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span>
</span><span id="line-175"></span><span>    </span><span id="local-6989586621679041105"><span class="annot"><span class="annottext">listen :: forall a. ReaderT r m a -&gt; ReaderT r m (a, w)
</span><a href="#local-6989586621679041105"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(m a -&gt; m (a, w)) -&gt; ReaderT r m a -&gt; ReaderT r m (a, w)
forall (m :: * -&gt; *) a (n :: * -&gt; *) b r.
(m a -&gt; n b) -&gt; ReaderT r m a -&gt; ReaderT r n b
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#mapReaderT"><span class="hs-identifier hs-var">mapReaderT</span></a></span><span> </span><span class="annot"><span class="annottext">m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m a -&gt; m (a, w)
</span><a href="Control.Monad.Writer.Class.html#listen"><span class="hs-identifier hs-var">listen</span></a></span><span>
</span><span id="line-176"></span><span>    </span><span id="local-6989586621679041102"><span class="annot"><span class="annottext">pass :: forall a. ReaderT r m (a, w -&gt; w) -&gt; ReaderT r m a
</span><a href="#local-6989586621679041102"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(m (a, w -&gt; w) -&gt; m a) -&gt; ReaderT r m (a, w -&gt; w) -&gt; ReaderT r m a
forall (m :: * -&gt; *) a (n :: * -&gt; *) b r.
(m a -&gt; n b) -&gt; ReaderT r m a -&gt; ReaderT r n b
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#mapReaderT"><span class="hs-identifier hs-var">mapReaderT</span></a></span><span> </span><span class="annot"><span class="annottext">m (a, w -&gt; w) -&gt; m a
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m (a, w -&gt; w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#pass"><span class="hs-identifier hs-var">pass</span></a></span></span></span></span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span id="local-6989586621679041438"><span id="local-6989586621679041439"><span id="local-6989586621679041440"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041440"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041439"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041440"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Lazy.html#StateT"><span class="hs-identifier hs-type">Lazy.StateT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041438"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041439"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-179"></span><span>    </span><span id="local-6989586621679041084"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; StateT s m a
</span><a href="#local-6989586621679041084"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; StateT s m a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m a -&gt; StateT s m a) -&gt; ((a, w) -&gt; m a) -&gt; (a, w) -&gt; StateT s m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; m a
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; (a, w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#writer"><span class="hs-identifier hs-var">writer</span></a></span><span>
</span><span id="line-180"></span><span>    </span><span id="local-6989586621679041080"><span class="annot"><span class="annottext">tell :: w -&gt; StateT s m ()
</span><a href="#local-6989586621679041080"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m () -&gt; StateT s m ()
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m () -&gt; StateT s m ()) -&gt; (w -&gt; m ()) -&gt; w -&gt; StateT s m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; m ()
forall w (m :: * -&gt; *). MonadWriter w m =&gt; w -&gt; m ()
</span><a href="Control.Monad.Writer.Class.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span>
</span><span id="line-181"></span><span>    </span><span id="local-6989586621679041077"><span class="annot"><span class="annottext">listen :: forall a. StateT s m a -&gt; StateT s m (a, w)
</span><a href="#local-6989586621679041077"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Listen w m (a, s) -&gt; Listen w (StateT s m) a
forall (m :: * -&gt; *) w a s.
Monad m =&gt;
Listen w m (a, s) -&gt; Listen w (StateT s m) a
</span><a href="../../transformers/src/Control.Monad.Trans.State.Lazy.html#liftListen"><span class="hs-identifier hs-var">Lazy.liftListen</span></a></span><span> </span><span class="annot"><span class="annottext">Listen w m (a, s)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m a -&gt; m (a, w)
</span><a href="Control.Monad.Writer.Class.html#listen"><span class="hs-identifier hs-var">listen</span></a></span><span>
</span><span id="line-182"></span><span>    </span><span id="local-6989586621679041073"><span class="annot"><span class="annottext">pass :: forall a. StateT s m (a, w -&gt; w) -&gt; StateT s m a
</span><a href="#local-6989586621679041073"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pass w m (a, s) -&gt; Pass w (StateT s m) a
forall (m :: * -&gt; *) w a s.
Monad m =&gt;
Pass w m (a, s) -&gt; Pass w (StateT s m) a
</span><a href="../../transformers/src/Control.Monad.Trans.State.Lazy.html#liftPass"><span class="hs-identifier hs-var">Lazy.liftPass</span></a></span><span> </span><span class="annot"><span class="annottext">Pass w m (a, s)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m (a, w -&gt; w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#pass"><span class="hs-identifier hs-var">pass</span></a></span></span></span></span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span id="local-6989586621679041417"><span id="local-6989586621679041418"><span id="local-6989586621679041419"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041419"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041418"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041419"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#StateT"><span class="hs-identifier hs-type">Strict.StateT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041417"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679041418"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-185"></span><span>    </span><span id="local-6989586621679041054"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; StateT s m a
</span><a href="#local-6989586621679041054"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; StateT s m a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m a -&gt; StateT s m a) -&gt; ((a, w) -&gt; m a) -&gt; (a, w) -&gt; StateT s m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; m a
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; (a, w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#writer"><span class="hs-identifier hs-var">writer</span></a></span><span>
</span><span id="line-186"></span><span>    </span><span id="local-6989586621679041050"><span class="annot"><span class="annottext">tell :: w -&gt; StateT s m ()
</span><a href="#local-6989586621679041050"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m () -&gt; StateT s m ()
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m () -&gt; StateT s m ()) -&gt; (w -&gt; m ()) -&gt; w -&gt; StateT s m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; m ()
forall w (m :: * -&gt; *). MonadWriter w m =&gt; w -&gt; m ()
</span><a href="Control.Monad.Writer.Class.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span>
</span><span id="line-187"></span><span>    </span><span id="local-6989586621679041047"><span class="annot"><span class="annottext">listen :: forall a. StateT s m a -&gt; StateT s m (a, w)
</span><a href="#local-6989586621679041047"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Listen w m (a, s) -&gt; Listen w (StateT s m) a
forall (m :: * -&gt; *) w a s.
Monad m =&gt;
Listen w m (a, s) -&gt; Listen w (StateT s m) a
</span><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#liftListen"><span class="hs-identifier hs-var">Strict.liftListen</span></a></span><span> </span><span class="annot"><span class="annottext">Listen w m (a, s)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m a -&gt; m (a, w)
</span><a href="Control.Monad.Writer.Class.html#listen"><span class="hs-identifier hs-var">listen</span></a></span><span>
</span><span id="line-188"></span><span>    </span><span id="local-6989586621679041043"><span class="annot"><span class="annottext">pass :: forall a. StateT s m (a, w -&gt; w) -&gt; StateT s m a
</span><a href="#local-6989586621679041043"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pass w m (a, s) -&gt; Pass w (StateT s m) a
forall (m :: * -&gt; *) w a s.
Monad m =&gt;
Pass w m (a, s) -&gt; Pass w (StateT s m) a
</span><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#liftPass"><span class="hs-identifier hs-var">Strict.liftPass</span></a></span><span> </span><span class="annot"><span class="annottext">Pass w m (a, s)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m (a, w -&gt; w) -&gt; m a
</span><a href="Control.Monad.Writer.Class.html#pass"><span class="hs-identifier hs-var">pass</span></a></span></span></span></span><span>
</span><span id="line-189"></span></pre></body></html>